package com.ultrapower.ctool.core;

import android.app.Application;

import com.ultrapower.ctool.AppContext;
import com.ultrapower.ctool.model.UserDO;
import com.ultrapower.ctool.utils.SerializableMap;

/**
 * Created by club on 2017/5/6.
 */

public class CustomApplication extends Application {
    public String appVersion = "v1.0";
    private static CustomApplication instance;

    public static CustomApplication getInstance() {
        return instance;
    }

    @Override

    public void onCreate() {
        super.onCreate();
        instance = this;

    }

    //当前登录用户
    private UserDO loginUser;
    private SerializableMap serializableMap;

    public UserDO getLoginUser() {
        return loginUser;
    }


    public void userLogin(UserDO user) {
        loginUser = user;
    }

    public void userLogout() {
        loginUser = new UserDO();
    }

    public SerializableMap getSerializableMap() {
        return serializableMap;
    }
    public void setSerializableMap(SerializableMap map){
        serializableMap=map;

    }
}